package com.mfangsoft.zhuangjialong.article.mapper;

import java.util.List;
import java.util.Map;

import com.mfangsoft.zhuangjialong.article.model.ArticleEvaluationEntity;
import com.mfangsoft.zhuangjialong.article.model.ArticleEvaluationModel;
import com.mfangsoft.zhuangjialong.common.model.Page;
import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;
@WriterRepository
public interface ArticleEvaluationEntityMapper {
    /**
     * 通过主键删除  
     *
     * @MLTH_generated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * 插入数据  
     *
     * @MLTH_generated
     */
    int insert(ArticleEvaluationEntity record);

    int insertSelective(ArticleEvaluationEntity record);

    /**
     * 通过主键查询数据 
     *
     * @MLTH_generated
     */
    ArticleEvaluationEntity selectByPrimaryKey(Integer id);
    
    /**
	 * 查询评论列表
	 */
	List<ArticleEvaluationEntity> selectAppArticleEvaluationsForPage(Page<ArticleEvaluationModel> param);

    int updateByPrimaryKeySelective(ArticleEvaluationEntity record);

    /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
    int updateByPrimaryKey(ArticleEvaluationEntity record);

    /**
     * 通过文章id获取评论数量
     * @param id
     * @return
     */
	Integer getEvaluationNumByArticleId(Long id);

	/**
	 * 根据评论的id查询该评论的回复量
	 * @param id
	 * @return
	 */
	Integer selectPosition_numByEvaluationId(Integer id);

	/**
	 * 文章评论查询
	 * @param page
	 * @return
	 */
	List<ArticleEvaluationModel> queryevaluationManagementForPage(Page<ArticleEvaluationModel> param);

	/**
	 * 通过评论的id修改评论的状态
	 * @param evaluationId
	 * @return
	 */
	Integer updateEvaluationStateByEvaluationId(Map<String,Object> map);



}